﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Content;
using DcsGauges.Exceptions;

namespace DcsGauges.Gui.Rendering
{
    public static class ModelManager
    {
        public static ContentManager ContentManager
        {
            get; set;
        }

        public static Model GetModel(string assetName)
        {
            if(ContentManager == null) throw new DpInvalidOperationException(DcsA10PanelResources.ErrorCannotUseModelManager);

            Model loaded = ContentManager.Load<Model>(assetName);
            return loaded;
        }
    }
}
